﻿Namespace Catalog
    Public Class BaseObject
        Public Property ID As Integer
        Public Property Name As String
        Public Property Slug As String

        Public Sub New()
        End Sub

        Public Sub New(id As Integer, name As String, slug As String)
            Me.ID = id
            Me.Name = name
            Me.Slug = slug
        End Sub

        'Public Shared Function FromBPObject(obj As BPOBase) As BaseObject
        '    If obj Is Nothing Then Return Nothing

        '    Select Case obj.type
        '        Case "release"
        '            Return Release.FromBPObject(obj)
        '        Case "label"
        '            Return Label.FromBPObject(obj)
        '        Case "artist"
        '            Return Artist.FromBPObject(obj)
        '        Case "chart"
        '            Return Chart.FromBPObject(obj)
        '        Case "track"
        '            Return Track.FromBPObject(obj)
        '        Case "genre"
        '            Return Genre.FromBPObject(obj)
        '        Case "remixer"

        '        Case "djprofile"

        '        Case "mix"

        '        Case Else
        '    End Select

        '    Return Nothing
        'End Function

        Public Overrides Function ToString() As String
            Return String.Format("{0}, {1}", Me.Name, Me.ID)
        End Function
    End Class
End Namespace